<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<s:if test="#session.oldemp==null">
	<c:redirect url="findPageAll_Emp.action"></c:redirect>
</s:if>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>员工更新</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style>
	table{
		font-size:12.5px
	}
</style>
</head>

<body>
<form action="update_Emp.action" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <table width="450" border="1" align="center" cellpadding="1" cellspacing="1">
    <tr>
      <td colspan="3" align="center" bgcolor="#FFFF99">员工修改</td>
    </tr>
    <tr>
      <td width="50">姓名:</td>
      <td width="277">
      	<s:textfield name="emp.ename" value="%{#session.oldemp.ename}"/>
      	<s:hidden name="emp.eid" value="%{#session.oldemp.eid}"/>
      </td>
      <td width="105" rowspan="7" align="center" valign="middle">
      	<img src="uppic/${oldemp.photo}" width="104" height="190" />
      </td>
    </tr>
    <tr>
      <td>性别:</td>
      <td><s:radio name="emp.sex" list="#{'男':'男','女':'女'}" listKey="key" listValue="value" value="%{#session.oldemp.sex}"/></td>
    </tr>
    <tr>
      <td>地址:</td>
      <td><s:textfield name="emp.address" value="%{#session.oldemp.address}"/></td>
    </tr>
    <tr>
      <td>生日:</td>
      <td><input type="date" name="emp.sdate" value="<s:date name="#session.oldemp.birthday" format="yyyy-MM-dd"/>"/></td>
    </tr>
    <tr>
      <td>部门:</td>
      <td><s:select name="emp.dep.depid" list="#session.lsdep" listKey="depid" listValue="depname" value="%{#session.oldemp.dep.depid}"/></td>
    </tr>
    <tr>
      <td>照片:</td>
      <td><s:file name="emp.pic"/></td>
    </tr>
    <tr>
      <td>薪资:</td>
      <td><s:textfield name="emp.emoney" value="%{#session.oldemp.emoney}"/></td>
    </tr>
    <tr>
      <td>福利:</td>
      <td colspan="2"><s:checkboxlist name="emp.wids" list="#session.lswf" listKey="wid" listValue="wname" value="%{#session.oldemp.wids}"/></td>
    </tr>
    <tr>
      <td colspan="3" align="center" bgcolor="#FFFF99"><s:submit value="确定"/>&nbsp;<s:reset value="重置"/></td>
    </tr>
  </table>
</form>
</body>
</html>